using System;
using Castle.Components.Validator;
using Iesi.Collections.Generic;
using NHibernate.Search.Attributes;

namespace WineCellar.Business.Entities
{
    public interface IWine
    {
        [ValidateNonEmpty("Name is a required field")]
        [Field(Index.Tokenized, Store = Store.No)]
        string Name { get; set; }

        [Field(Index.Tokenized, Store = Store.No)]
        string Producer { get; set; }

        [Field(Index.Tokenized, Store = Store.No)]
        string Appelation { get; set; }

        [Field(Index.Tokenized, Store = Store.No)]
        string ColorType { get; set; }

        [Field(Index.Tokenized, Store = Store.No)]
        DateTime? DateAdded { get; set; }

        [DocumentId]
        int? Id { get; set; }

        [ValidateNonEmpty("Region is required")]
        [IndexedEmbedded]
        Region Region { get; set; }

        [IndexedEmbedded]
        User AddedBy { get; set; }

        ISet<Raisin> Raisins { get; set; }
        Guid SecurityKey { get; set; }
        string ToString();
    }
}